<template>
  <div class="jianDing-page">
    <Menus title="鉴定机构查询" :home="true" />
    <div class="jianding-container">
      <div class="hts">
        <i class="glyphicon glyphicon-info-sign"></i> 请选择需要鉴定的类别，获得相应鉴定机构</div>
      <div class="item" v-for="(item, index) in jianding" :key="'key-'+index">
        <div class="ht"><img src="static/img/icon/jianding/01.png">{{item.title}}</div>
        <div class="content">
          <template v-for="(list,idx) in item.list">
            <div class="bt" v-if="list.title" :key="'key-'+idx"><img src="static/img/icon/jianding/circle.png">{{list.title}}</div>
            <div class="btn-groups" :key="'key-btn-'+idx">
              <a href="javascript:void(0)" @click="getType(type)" v-for="(type,i) in list.item" :key="'key-'+i" class="btn btn-default">{{type[0]}}</a>
            </div>
          </template>

        </div>
      </div>
    </div>

  </div>
</template>
<script>
import Menus from '../components/Menu'
import { jianding } from '../config'
export default {
  components: {
    Menus
  },
  data() {
    return {
      jianding,
      currenttype: ''
    }
  },
  methods: {
    getType(type) {
      if (type[1] !== 0) {
        this.currenttype = type[1]
      } else {
        this.currenttype = type[0]
      }
      this.$router.push({ name: 'JDList', params: { type: this.currenttype } })
    }
  }
}
</script>
<style lang="scss">
.jianDing-page {
  padding-top: 1.6rem;
}
.jianding-container {
  margin: 0.5rem auto;
  width: 12.8rem;
  .hts {
    font-size: 0.26rem;
    padding-bottom: 0.3rem;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    i {
      margin-right: 0.1rem;
    }
  }
  .item {
    margin-bottom: 0.35rem;
    display: flex;
    background: #fff;
    border-radius: 0.1rem;
    padding: 0.3rem;
    .ht {
      width: 2.4rem;
      padding-right: 0.3rem;
      flex-shrink: 0;
      font-size: 0.26rem;
      color: #0a57bc;
      margin-right: 0.5rem;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      border-right: 1px dashed #ddd;
      img {
        flex-shrink: 0;
        display: block;
        width: 0.96rem;
        height: 0.96rem;
      }
    }
    .content {
      .bt {
        font-size: 0.2rem;
        display: flex;
        align-items: center;
        margin-bottom: 0.2rem;
        img {
          margin-right: 0.1rem;
        }
      }
      .btn-groups {
        margin-bottom: 0.2rem;
      }
      .btn {
        margin: 0 0.1rem 0.1rem 0;
        font-size: 0.16rem;
        color: #666;
      }
    }
  }
}
@media screen and (orientation: portrait) {
  .jianding-container {
    width: 100%;
    padding: 0 0.5rem;
    .item {
      flex-direction: column;
      .ht {
        flex-direction: row;
        padding: 0 0 0.2rem;
        margin: 0 0 0.2rem;
        border-bottom: 1px solid #ddd;
        width: 100%;
        border-right: 0;
        justify-content: flex-start;
        img {
          width: 0.4rem;
          height: 0.4rem;
        }
      }
    }
  }
}
@media screen and (orientation: landscape) {
}
</style>
